Integrand size = 25, antiderivative size = 128 \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=-\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{5/2} f}+\frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt {a+b \tan ^2(e+f x)}} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3751, 482, 541, 12, 385, 209} \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=-\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f (a-b)^{5/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a f (a-b)^2 \sqrt {a+b \tan ^2(e+f x)}}+\frac {\tan (e+f x)}{3 f (a-b) \left (a+b \tan ^2(e+f x)\right )^{3/2}} \]
[In]
[Out]
Rule 12
Rule 209
Rule 385
Rule 482
Rule 541
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{5/2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}-\frac {\text {Subst}\left (\int \frac {1-2 x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan (e+f x)\right )}{3 (a-b) f} \\ & = \frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt {a+b \tan ^2(e+f x)}}-\frac {\text {Subst}\left (\int \frac {3 a}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 a (a-b)^2 f} \\ & = \frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt {a+b \tan ^2(e+f x)}}-\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f} \\ & = \frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt {a+b \tan ^2(e+f x)}}-\frac {\text {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^2 f} \\ & = -\frac {\arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{(a-b)^{5/2} f}+\frac {\tan (e+f x)}{3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^{3/2}}+\frac {(2 a+b) \tan (e+f x)}{3 a (a-b)^2 f \sqrt {a+b \tan ^2(e+f x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 7.82 (sec) , antiderivative size = 305, normalized size of antiderivative = 2.38 \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\frac {\sin ^2(e+f x) \tan (e+f x) \left (\frac {4 (a-b) \operatorname {Hypergeometric2F1}\left (2,2,\frac {9}{2},\frac {(a-b) \sin ^2(e+f x)}{a}\right ) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{35 a^2}+\frac {\cot ^4(e+f x) \left (5 a+2 b \tan ^2(e+f x)\right ) \left (3 \arcsin \left (\sqrt {\frac {(a-b) \sin ^2(e+f x)}{a}}\right ) \left (a+b \tan ^2(e+f x)\right )^2+a \sec ^2(e+f x) \sqrt {\frac {(a-b) \cos ^2(e+f x) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{a^2}} \left (-4 b \tan ^2(e+f x)+a \left (-3+\tan ^2(e+f x)\right )\right )\right )}{3 a (a-b)^2 \sqrt {\frac {(a-b) \cos ^2(e+f x) \sin ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )}{a^2}}}\right )}{3 a^2 f \sqrt {a+b \tan ^2(e+f x)} \left (1+\frac {b \tan ^2(e+f x)}{a}\right )} \]
[In]
[Out]
Time = 0.07 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.66
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{\left (a -b \right )^{3} b^{2}}+\frac {b \tan \left (f x +e \right )}{\left (a -b \right )^{2} a \sqrt {a +b \tan \left (f x +e \right )^{2}}}+\frac {b \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{a -b}}{f}\) | \(212\) |
default | \(\frac {\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{\left (a -b \right )^{3} b^{2}}+\frac {b \tan \left (f x +e \right )}{\left (a -b \right )^{2} a \sqrt {a +b \tan \left (f x +e \right )^{2}}}+\frac {b \left (\frac {\tan \left (f x +e \right )}{3 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}}}+\frac {2 \tan \left (f x +e \right )}{3 a^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{a -b}}{f}\) | \(212\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 249 vs. \(2 (114) = 228\).
Time = 0.32 (sec) , antiderivative size = 529, normalized size of antiderivative = 4.13 \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\left [-\frac {3 \, {\left (a b^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} b \tan \left (f x + e\right )^{2} + a^{3}\right )} \sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \, {\left ({\left (2 \, a^{2} b - a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (a^{3} - a^{2} b\right )} \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{6 \, {\left ({\left (a^{4} b^{2} - 3 \, a^{3} b^{3} + 3 \, a^{2} b^{4} - a b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{5} b - 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{6} - 3 \, a^{5} b + 3 \, a^{4} b^{2} - a^{3} b^{3}\right )} f\right )}}, -\frac {3 \, {\left (a b^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} b \tan \left (f x + e\right )^{2} + a^{3}\right )} \sqrt {a - b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right ) - {\left ({\left (2 \, a^{2} b - a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (a^{3} - a^{2} b\right )} \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{3 \, {\left ({\left (a^{4} b^{2} - 3 \, a^{3} b^{3} + 3 \, a^{2} b^{4} - a b^{5}\right )} f \tan \left (f x + e\right )^{4} + 2 \, {\left (a^{5} b - 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - a^{2} b^{4}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{6} - 3 \, a^{5} b + 3 \, a^{4} b^{2} - a^{3} b^{3}\right )} f\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\int \frac {\tan ^{2}{\left (e + f x \right )}}{\left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Timed out. \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {\tan ^2(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^{5/2}} \, dx=\int \frac {{\mathrm {tan}\left (e+f\,x\right )}^2}{{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{5/2}} \,d x \]
[In]
[Out]